package com.lc.common;

import lombok.Data;

@Data
public class HttpResult<T> {
    private T data;
    private boolean succeed;
    private String errorMsg;

    public static <T> HttpResult ok(T obj){
        HttpResult res = new HttpResult();
        res.setData(obj);
        return res;
    }
    public static HttpResult error(String errorMsg){
        HttpResult res = new HttpResult();
        res.setSucceed(false);
        res.setErrorMsg(errorMsg);
        return res;
    }
}
